//
//  Notice.swift
//  Employee
//
//  Created by swordjoy on 2017/3/31.
//  Copyright © 2017年 remotevillage. All rights reserved.
//

import Foundation

import SwiftyJSON

/// 通知列表
struct Notice: ModelProtocol {
  let time: String
  let title: String
  let content: String
  
  init(json: JSON) {
    time = json["sendDate"].stringValue
    title = json["title"].stringValue
    content = json["content"].stringValue
  }
  
  static func array(from jsonArray: [JSON]) -> [Notice] {
    return jsonArray.map({ (json) -> Notice in
      Notice(json: json)
    })
  }
}
